#include<cstdio>
#include<cstring>
const int maxn=100010;
int n,c[maxn];
int low(int i)
{
	return i&(i^(i-1));
}
void add(int i,int v)
{
	while(i>0)
	{
		c[i]+=v;
		i-=low(i);
	}
}
int sum(int x)
{
	int ans=0;
	while(x<=n)
	{
		ans+=c[x];
		x+=low(x);
	}
	return ans;
}
int main()
{
	freopen("test.in","r",stdin);
	while(scanf("%d",&n)&&n)
	{
		memset(c,0,sizeof(c));
		int x,y;
		for(int i=1;i<=n;i++)
		{
			scanf("%d%d",&x,&y);
			add(y,1);
			add(x-1,-1);
		}
		for(int i=1;i<n;i++)
			printf("%d ",sum(i));
		printf("%d\n",sum(n));
	}
	return 0;
}




